Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add max value for balance calculation #3550

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

samaradel
Copy link
Contributor

@samaradel samaradel commented Oct 23, 2024

Description

Add max value for balance calculation to be 1000000000000000.

Changes

image

Related Issues

Tested Scenarios

Try to add more than 1000000000000000 in balance input.

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

@@ -50,6 +50,7 @@ export const hruRules = _applyRules([
export const balanceRules = _applyRules([
isNumeric("Balance must be a valid number."),
min("Minimum allowed balance is 0.", 0),
max("Maximum allowed balance is 1000000000000000 TFT.", 10 ** 15),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make it "Maximum allowed balance is 10e15" ? It is difficult keeping track of all the zeros

@@ -50,6 +50,7 @@ export const hruRules = _applyRules([
export const balanceRules = _applyRules([
isNumeric("Balance must be a valid number."),
min("Minimum allowed balance is 0.", 0),
max("Maximum allowed balance is 10e15 TFT.", 10 ** 15),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad should be 1e15, not 10e15.

@samaradel samaradel merged commit c0d9939 into development Oct 24, 2024
10 checks passed
@samaradel samaradel deleted the development_balance_calc branch October 24, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants